<div class="row-fluid">
    <div class="span3">
        <piechart width="200" height="200" initial="host.os_info" title="虚拟机操作系统"></piechart>
    </div>
    <div class="span9">

        <table class="table table-condensed table-overview no-hover">
            <thead>
            <th>主机信息</th>
            </thead>
            <tbody>
            <tr>
                <td>
                    <div>状态:</div>
                    <div>
                            <img src="/static/images/icon/server_unactive.png" class="img-size" alt="未激活" ng-show="host.status==1"/>
                            <img src="/static/images/icon/server_stop.png" class="img-size" alt="离线" ng-show="host.status==3"/>
                            <img src="/static/images/icon/server_ok.png" class="img-size" alt="正常" ng-show="host.status==2"/>
                            <img src="/static/images/icon/server_maintain.png" class="img-size" alt="维护" ng-show="host.status==0"/>
                    </div>
                </td>
                <td>
                    <div>虚拟机:</div>
                    <div><span class="label label-info">{{ host.instance_set.length }}</span></div>
                </td>
                <td>
                    <div>架构:</div>
                    <div><span class="label label-info">{{ host.arch }}</span></div>
                </td>
            </tr>
            <tr>
                <td>
                    <div>cpu:</div>
                    <div><span class="badge badge-success">{{ host.cpu }}</span></div>
                </td>
                <td>
                    <div>内存:</div>
                    <div><span class="label label-info">{{ host.mem *1024 * 1024| bytes }}</span></div>
                </td>
                <td>
                    <div>cpu类型:</div>
                    <div><span class="label label-warning">{{ host.cpu_type }}</span></div>
                </td>
            </tr>
            <tr>
                <td>
                    <div>内存共享:</div>
                    <div><span class="label label-info">{{ host.memshare |yesorno}}</span></div>
                </td>
                <td>
                    <div>集群:</div>
                    <div><span class="label label-info">{{ host.cluster.name }}</span></div>
                </td>
                <td>
                    <div>远程管理卡:</div>
                    <div><span class="label label-info">{{ host.powertool | yesorno}}</span></div>
                </td>
            </tr>

            </tbody>
        </table>
    </div>
</div>
<div class="tab-pane" style="padding:0px 10px; margin-bottom: 10px; text-align: center;">
    <div class="input-prepend input-append" ng-controller="HostActionBarCtrl">
        <button type="button" class="btn" ng-click="do_edit()">修改</button>
        <!--<button type="button" class="btn" ng-click="do_maintain()">维护</button>-->
    </div>
    <div class="input-append input-prepend" ng-controller="VMActionBarCtrl">
        <div class="btn-group">
            <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
                创建
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu">
                <li><a ng-click="do_create()">创建服务器</a></li>
                <!--<li><a href="#/setup_vm">创建桌面</a></li>-->
            </ul>
        </div>
    </div>
</div>
<div class="row-fluid">
    <div class="span4">
        <curvegraph url="/api/host/{{ host.id }}/current_cpu" name="CPU" suffix="%" width="300" height="160"
                    max="100" min="0" title="CPU" serienum='1' seriesnam1='cpu'></curvegraph>
    </div>
    <div class="span4">
        <curvegraph url="/api/host/{{ host.id }}/current_mem" name="Memory" suffix="bytes" width="300" height="160"
                    min="0" max="8192" title="内存" serienum='2'  seriesnam1='物理' seriesnam2='虚拟'></curvegraph>
    </div>
    <div class="span4">
        <curvegraph url="/api/host/{{ host.id }}/current_traffic" name="Network" suffix="bytes" width="300" height="160"
                    min="0" max="1024" title="网络" serienum='2'  seriesnam1='已接收' seriesnam2='已发送'></curvegraph>
    </div>
</div>